#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

int main()
{
	double x;
	char ch;
	cin >> x >> ch;
	int ret = 20;
	if (ch == 'y')
		ret += 5;
	if (x > 1)
	{
		double d = x - int(x);
		if (d > 0)
		{
			ret += int(x);
		}
		else
		{
			ret += int(x) - 1;
		}
	}
	cout << ret << endl;

	return 0;
}